package com.qifenqian.turbot.module.contract

import com.qifenqian.turbot.module.entity.response.marketing.*
import com.qifenqian.turbot.net.ModelCallback

/**
 * @author H
 * @createTime 2019/1/18 10:03
 * @description
 * @see
 * @since
 */
interface MarketingContract {

    interface Model {
        /**
         * 获取营销首页
         */
        fun getMarketingPage(callback: ModelCallback<MarketingHomeEntity>)

        /**
         * 获取特价菜列表
         */
        fun getSpecialDishes(callback: ModelCallback<SpecialDishEntity>)

        /**
         * 保存特价菜列表
         */
        fun saveSpecialDishes(request: SpecialDishEntity, callback: ModelCallback<Nothing>)

        /**
         * 删除特价菜
         */
        fun deleteSpecialDish(id: Int, callback: ModelCallback<Nothing>)

        /**
         * 获取单品折扣页面
         */
        fun getDiscountDishes(callback: ModelCallback<DiscountDishEntity>)

        /**
         * 闲时折扣列表
         */
        fun getFreeTimeDiscount(callback: ModelCallback<FreeTimeDiscountDetailEntity>)

        /**
         * 删除闲时折扣
         */
        fun deleteFreeTimeDiscount(id: Int, callback: ModelCallback<Nothing>)

        /**
         * 闲时折扣详情
         */
        fun getFreeTimeDiscountDetail(callback: ModelCallback<FreeTimeDiscountDetailEntity>)

        /**
         * 保存闲时折扣详情
         */
        fun saveFreeTimeDiscountDetail(request: FreeTimeDiscountDetailEntity, callback: ModelCallback<Nothing>)

        /**
         * 获取分享优惠券界面数据
         */
        fun getShareDiscount(callback: ModelCallback<ShareDiscountEntity>)

        /**
         * 保存优惠券信息
         */
        fun saveShareDiscount(request: ShareDiscountEntity, callback: ModelCallback<Nothing>)

        /**
         * 获取满减信息
         */
        fun getFullReduction(callback: ModelCallback<FullReductionEntity>)

        /**
         * 保存满减信息
         */
        fun saveFullReduction(request: FullReductionEntity, callback: ModelCallback<Nothing>)

        /**
         * 获取提前买单折扣
         */
        fun getEarlyPayDiscount(callback: ModelCallback<EarlyPayDiscountEntity>)

        /**
         * 保存提前买单折扣
         */
        fun saveEarlyPayDiscount(request: EarlyPayDiscountEntity, callback: ModelCallback<Nothing>)
    }

    interface View {
        fun getMarketingPageResult(isSuccess: Boolean, code: Int = 0, msg: String? = null, marketingHomeEntity: MarketingHomeEntity? = null) {}

        fun getSpecialDishesResult(isSuccess: Boolean, code: Int = 0, msg: String? = null, specialDishEntity: SpecialDishEntity? = null) {}

        fun saveSpecialDishesResult(isSuccess: Boolean, code: Int = 0, msg: String? = null) {}

        fun deleteSpecialDishResult(isSuccess: Boolean, code: Int = 0, msg: String? = null, view: android.view.View? = null) {}

        fun getDiscountDishesResult(isSuccess: Boolean, code: Int = 0, msg: String? = null, discountDishEntity: DiscountDishEntity? = null) {}

        fun getFreeTimeDiscountResult(isSuccess: Boolean, code: Int = 0, msg: String? = null, t: FreeTimeDiscountDetailEntity? = null) {}

        fun deleteFreeTimeDiscountResult(isSuccess: Boolean, code: Int = 0, msg: String? = null) {}

        fun getFreeTimeDiscountDetailResult(isSuccess: Boolean, code: Int = 0, msg: String? = null, t: FreeTimeDiscountDetailEntity? = null) {}

        fun saveFreeTimeDiscountDetailResult(isSuccess: Boolean, code: Int = 0, msg: String? = null) {}

        fun getShareDiscountResult(isSuccess: Boolean, code: Int = 0, msg: String? = null, shareDiscountEntity: ShareDiscountEntity? = null) {}

        fun saveShareDiscountResult(isSuccess: Boolean, code: Int = 0, msg: String? = null) {}

        fun getFullReductionResult(isSuccess: Boolean, code: Int = 0, msg: String? = null, t: FullReductionEntity? = null) {}

        fun saveFullReductionResult(isSuccess: Boolean, code: Int = 0, msg: String? = null) {}

        fun getEarlyPayDiscountResult(isSuccess: Boolean, code: Int = 0, msg: String? = null, t: EarlyPayDiscountEntity? = null) {}

        fun saveEarlyPayDiscountResult(isSuccess: Boolean, code: Int = 0, msg: String? = null) {}
    }

    interface Presenter {
        fun getMarketingPage()

        fun getSpecialDishes()

        fun saveSpecialDishes(request: SpecialDishEntity)

        fun deleteSpecialDish(id: Int, view: android.view.View)

        fun getDiscountDishes()

        fun getFreeTimeDiscount()

        //todo 未实现
        fun deleteFreeTimeDiscount(id: Int)

        fun getFreeTimeDiscountDetail()

        fun saveFreeTimeDiscountDetail(request: FreeTimeDiscountDetailEntity)

        fun getShareDiscount()

        fun saveShareDiscount(request: ShareDiscountEntity)

        fun getFullReduction()

        fun saveFullReduction(request: FullReductionEntity)

        fun getEarlyPayDiscount()

        fun saveEarlyPayDiscount(request: EarlyPayDiscountEntity)
    }
}
